package leetcode.prefixSum;

import leetcode.prefixSum.common.PrefixSumUtils;

class Solution523 {
    public boolean checkSubarraySum(int[] nums, int k) {
        return PrefixSumUtils.checkSubarraySum(nums, k);
    }
}

public class leetcode523 {
    public static void main(String[] args) {
        Solution523 solution523 = new Solution523();
        int[] nums = {23, 2, 4, 6, 7};
        int[] nums1 = {23, 2, 6, 4, 7};
        int[] nums2 = {23, 2, 6, 4, 7};
        int[] nums3 = {23, 2, 4, 6, 6};
        int[] nums4 = {5, 0, 0, 0};
        int[] nums5 = {0, 1, 0, 3, 0, 4, 0, 4, 0};
//        System.out.println(solution523.checkSubarraySum(nums, 6));
//        System.out.println(solution523.checkSubarraySum(nums1, 6));
//        System.out.println(solution523.checkSubarraySum(nums2, 13));
//        System.out.println(solution523.checkSubarraySum(nums3, 7));
//        System.out.println(solution523.checkSubarraySum(nums4, 3));
        System.out.println(solution523.checkSubarraySum(nums5, 5));
    }
}
